import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import mutations from './mutation'

Vue.use(Vuex)

export default new Vuex.Store({
	// state: {
	// 	city:  defaultCity
	// },
	// actions: {
	// 	changeCity (ctx,city) {
	// 		//提交到mutation中的 changeCity
	// 		ctx.commit('changeCity',city)
	// 	},
	// },
	// mutations: {
	// 	export default {
	// changeCity (state , city) {
	// 		//指向所有的公用数据
	// 		state.city = city
	// 		try {
	// 			localStorage.city = city
	// 		} catch (e) {

	// 		}
	// 	}
	// }
	state,
	mutations
})